package com.zjbbkj.baibai.netty.message.sendpackage;

import com.zjbbkj.baibai.common.utils.wanli.SessionIdGeneratorUtils;
import lombok.extern.slf4j.Slf4j;
import static com.zjbbkj.baibai.netty.constants.NettySomeThing.*;

@Slf4j
public class ASY {

    /**
     * 设备能力级查询
     * @param ISABLE 响应失败/成功
     * @return
     */
    public static String ASY_DEVICE(String ISABLE) {
        try {
            //_017ASY147852/1\r\n
            String type = "ASY";
            String random = SessionIdGeneratorUtils.getRandomStrID();
            String cmd = START + NUM + type + random + "/" + ISABLE + "\r\n";
            cmd = START + "0" + cmd.length() + type + random + "/" + ISABLE + "\r\n";
            if (ON_OFF.equals("1")) {
                log.info(cmd);
            }
            return cmd;
        } catch (Exception e) {
            log.info(e.getMessage());
            return "null";
        }
    }
}
